<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/4/18
  Time: 15:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

    <title>斑马线后台管理登录</title>
    <link href="${pageContext.request.contextPath}/static/css/bootstrap.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/css/animate.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/css/style.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/css/login.min.css" rel="stylesheet">
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <script>
        if(window.top!==window.self){window.top.location=window.location};
    </script>

</head>

<body class="signin">
<div class="signinpanel">
    <div class="row">
        <div class="col-sm-6 col-sm-offset-3">
            <form action="/user/login">
                <h2 class="text-muted text-center">斑马线</h2>
                <input type="text" class="form-control uname" placeholder="用户名" name="name"/>
                <input type="password" class="form-control pword m-b" placeholder="密码" name="pwd"/>
                <%--<c:if test="">--%>
                    <label>验证码:</label><input type="text" name="yzm"/><img id="imgObj" alt="验证码" width="100" height="30"
                                                                                                                         src="${base}/getImage" onclick="changeImg()">
                <%--</c:if>--%>
                <input type="hidden" name="type" value="1">
                <span style="display:block;width:auto;text-align:center;color: red">${msg}</span>
                <span style="display:block;width:auto;text-align:center;color: red" id="sssss">${s}</span>
                <button class="btn btn-success btn-block">登录</button>
            </form>
        </div>
    </div>
    <div class="signup-footer">

    </div>
</div>
</body>
<script src="${pageContext.request.contextPath}/static/js/jquery.min.js"></script>
<script>
    function  changeImg() {
        var imgSrc = $("#imgObj");
        var src = imgSrc.attr("src");
        imgSrc.attr("src", chgUrl(src));
    };
    //时间戳
    //为了使每次生成图片不一致，即不让浏览器读缓存，所以需要加上时间戳
    function chgUrl(url) {
        var timestamp = (new Date()).valueOf();
        var stamp = $("#timestamp");
        return url;
    };
</script>

</html>

